/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.hendro.latihan;

import com.hendro.latihan.dao.StockDao;
import com.hendro.latihan.entity.Stock;
import com.hendro.latihan.util.StockDatabase;
import java.sql.SQLException;
import java.util.Date;

/**
 *
 * @author Hendro
 */
public class Main {

    public static void main(String[] args) throws SQLException {
        StockDao dao = StockDatabase.getStockDao();
        
        Stock stock = new Stock();
        stock.setId(1);
        stock.setNamaBarang("Mie Sedap");
        stock.setQuantity(30);
        stock.setHarga(1750);
        stock.setTanggalPemesanan(new Date());
        
        dao.updateStock(stock);
    }
}
